import request from './request.js';

/** @name 登录 **/
export function loginAPI (data) {
  return request({
    url: '/wx/login',
    method: 'post',
    data
  }, {
    loading_flag: true,
    loading_text: '登录中...',
    data_format: false
  })
}

/** @name 用户授权 **/
export function authAPI (data) {
  return request({
    url: '/wx/auth',
    method: 'post',
    data
  })
}

/** @name 获取用户信息 **/
export function getUserInfoAPI () {
  return request({
    url: '/wx/userInfo',
    method: 'get'
  }, {
    data_format: false
  })
}
